3.83 \(\int \frac{\csc (e+f x)}{(a+b \tan ^2(e+f x))^3} \, dx\)

Optimal. Leaf size=166 \[ -\frac{\sqrt{b} \left (15 a^2-20 a b+8 b^2\right ) \tan ^{-1}\left (\frac{\sqrt{b} \sec (e+f x)}{\sqrt{a-b}}\right )}{8 a^3 f (a-b)^{5/2}}-\frac{b (7 a-4 b) \sec (e+f x)}{8 a^2 f (a-b)^2 \left (a+b \sec ^2(e+f x)-b\right )}-\frac{\tanh ^{-1}(\cos (e+f x))}{a^3 f}-\frac{b \sec (e+f x)}{4 a f (a-b) \left (a+b \sec ^2(e+f x)-b\right )^2} \]

[Out]

-(Sqrt[b]*(15*a^2 - 20*a*b + 8*b^2)*ArcTan[(Sqrt[b]*Sec[e + f*x])/Sqrt[a - b]])/(8*a^3*(a - b)^(5/2)*f) - ArcT
anh[Cos[e + f*x]]/(a^3*f) - (b*Sec[e + f*x])/(4*a*(a - b)*f*(a - b + b*Sec[e + f*x]^2)^2) - ((7*a - 4*b)*b*Sec
[e + f*x])/(8*a^2*(a - b)^2*f*(a - b + b*Sec[e + f*x]^2))

________________________________________________________________________________________

Rubi [A]  time = 0.21679, antiderivative size = 166, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.286, Rules used = {3664, 414, 527, 522, 207, 205} \[ -\frac{\sqrt{b} \left (15 a^2-20 a b+8 b^2\right ) \tan ^{-1}\left (\frac{\sqrt{b} \sec (e+f x)}{\sqrt{a-b}}\right )}{8 a^3 f (a-b)^{5/2}}-\frac{b (7 a-4 b) \sec (e+f x)}{8 a^2 f (a-b)^2 \left (a+b \sec ^2(e+f x)-b\right )}-\frac{\tanh ^{-1}(\cos (e+f x))}{a^3 f}-\frac{b \sec (e+f x)}{4 a f (a-b) \left (a+b \sec ^2(e+f x)-b\right )^2} \]

Antiderivative was successfully verified.

[In]

Int[Csc[e + f*x]/(a + b*Tan[e + f*x]^2)^3,x]

[Out]

-(Sqrt[b]*(15*a^2 - 20*a*b + 8*b^2)*ArcTan[(Sqrt[b]*Sec[e + f*x])/Sqrt[a - b]])/(8*a^3*(a - b)^(5/2)*f) - ArcT
anh[Cos[e + f*x]]/(a^3*f) - (b*Sec[e + f*x])/(4*a*(a - b)*f*(a - b + b*Sec[e + f*x]^2)^2) - ((7*a - 4*b)*b*Sec
[e + f*x])/(8*a^2*(a - b)^2*f*(a - b + b*Sec[e + f*x]^2))

Rule 3664

Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]^2)^(p_.), x_Symbol] :> With[{ff = Free
Factors[Sec[e + f*x], x]}, Dist[1/(f*ff^m), Subst[Int[((-1 + ff^2*x^2)^((m - 1)/2)*(a - b + b*ff^2*x^2)^p)/x^(
m + 1), x], x, Sec[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[(m - 1)/2]

Rule 414

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> -Simp[(b*x*(a + b*x^n)^(p + 1)*(
c + d*x^n)^(q + 1))/(a*n*(p + 1)*(b*c - a*d)), x] + Dist[1/(a*n*(p + 1)*(b*c - a*d)), Int[(a + b*x^n)^(p + 1)*
(c + d*x^n)^q*Simp[b*c + n*(p + 1)*(b*c - a*d) + d*b*(n*(p + q + 2) + 1)*x^n, x], x], x] /; FreeQ[{a, b, c, d,
 n, q}, x] && NeQ[b*c - a*d, 0] && LtQ[p, -1] &&  !( !IntegerQ[p] && IntegerQ[q] && LtQ[q, -1]) && IntBinomial
Q[a, b, c, d, n, p, q, x]

Rule 527

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_.)*((e_) + (f_.)*(x_)^(n_)), x_Symbol] :> -Simp[
((b*e - a*f)*x*(a + b*x^n)^(p + 1)*(c + d*x^n)^(q + 1))/(a*n*(b*c - a*d)*(p + 1)), x] + Dist[1/(a*n*(b*c - a*d
)*(p + 1)), Int[(a + b*x^n)^(p + 1)*(c + d*x^n)^q*Simp[c*(b*e - a*f) + e*n*(b*c - a*d)*(p + 1) + d*(b*e - a*f)
*(n*(p + q + 2) + 1)*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, f, n, q}, x] && LtQ[p, -1]

Rule 522

Int[((e_) + (f_.)*(x_)^(n_))/(((a_) + (b_.)*(x_)^(n_))*((c_) + (d_.)*(x_)^(n_))), x_Symbol] :> Dist[(b*e - a*f
)/(b*c - a*d), Int[1/(a + b*x^n), x], x] - Dist[(d*e - c*f)/(b*c - a*d), Int[1/(c + d*x^n), x], x] /; FreeQ[{a
, b, c, d, e, f, n}, x]

Rule 207

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTanh[(Rt[b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rubi steps

\begin{align*} \int \frac{\csc (e+f x)}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{1}{\left (-1+x^2\right ) \left (a-b+b x^2\right )^3} \, dx,x,\sec (e+f x)\right )}{f}\\ &=-\frac{b \sec (e+f x)}{4 a (a-b) f \left (a-b+b \sec ^2(e+f x)\right )^2}+\frac{\operatorname{Subst}\left (\int \frac{4 a-b-3 b x^2}{\left (-1+x^2\right ) \left (a-b+b x^2\right )^2} \, dx,x,\sec (e+f x)\right )}{4 a (a-b) f}\\ &=-\frac{b \sec (e+f x)}{4 a (a-b) f \left (a-b+b \sec ^2(e+f x)\right )^2}-\frac{(7 a-4 b) b \sec (e+f x)}{8 a^2 (a-b)^2 f \left (a-b+b \sec ^2(e+f x)\right )}+\frac{\operatorname{Subst}\left (\int \frac{8 a^2-9 a b+4 b^2-(7 a-4 b) b x^2}{\left (-1+x^2\right ) \left (a-b+b x^2\right )} \, dx,x,\sec (e+f x)\right )}{8 a^2 (a-b)^2 f}\\ &=-\frac{b \sec (e+f x)}{4 a (a-b) f \left (a-b+b \sec ^2(e+f x)\right )^2}-\frac{(7 a-4 b) b \sec (e+f x)}{8 a^2 (a-b)^2 f \left (a-b+b \sec ^2(e+f x)\right )}+\frac{\operatorname{Subst}\left (\int \frac{1}{-1+x^2} \, dx,x,\sec (e+f x)\right )}{a^3 f}-\frac{\left (b \left (15 a^2-20 a b+8 b^2\right )\right ) \operatorname{Subst}\left (\int \frac{1}{a-b+b x^2} \, dx,x,\sec (e+f x)\right )}{8 a^3 (a-b)^2 f}\\ &=-\frac{\sqrt{b} \left (15 a^2-20 a b+8 b^2\right ) \tan ^{-1}\left (\frac{\sqrt{b} \sec (e+f x)}{\sqrt{a-b}}\right )}{8 a^3 (a-b)^{5/2} f}-\frac{\tanh ^{-1}(\cos (e+f x))}{a^3 f}-\frac{b \sec (e+f x)}{4 a (a-b) f \left (a-b+b \sec ^2(e+f x)\right )^2}-\frac{(7 a-4 b) b \sec (e+f x)}{8 a^2 (a-b)^2 f \left (a-b+b \sec ^2(e+f x)\right )}\\ \end{align*}

Mathematica [A]  time = 3.00168, size = 247, normalized size = 1.49 \[ \frac{\frac{8 a^2 b^2 \cos (e+f x)}{(a-b)^2 ((a-b) \cos (2 (e+f x))+a+b)^2}+\frac{\sqrt{b} \left (15 a^2-20 a b+8 b^2\right ) \tan ^{-1}\left (\frac{\sqrt{a-b}-\sqrt{a} \tan \left (\frac{1}{2} (e+f x)\right )}{\sqrt{b}}\right )}{(a-b)^{5/2}}+\frac{\sqrt{b} \left (15 a^2-20 a b+8 b^2\right ) \tan ^{-1}\left (\frac{\sqrt{a-b}+\sqrt{a} \tan \left (\frac{1}{2} (e+f x)\right )}{\sqrt{b}}\right )}{(a-b)^{5/2}}-\frac{2 a b (9 a-4 b) \cos (e+f x)}{(a-b)^2 ((a-b) \cos (2 (e+f x))+a+b)}+8 \log \left (\sin \left (\frac{1}{2} (e+f x)\right )\right )-8 \log \left (\cos \left (\frac{1}{2} (e+f x)\right )\right )}{8 a^3 f} \]

Antiderivative was successfully verified.

[In]

Integrate[Csc[e + f*x]/(a + b*Tan[e + f*x]^2)^3,x]

[Out]

((Sqrt[b]*(15*a^2 - 20*a*b + 8*b^2)*ArcTan[(Sqrt[a - b] - Sqrt[a]*Tan[(e + f*x)/2])/Sqrt[b]])/(a - b)^(5/2) +
(Sqrt[b]*(15*a^2 - 20*a*b + 8*b^2)*ArcTan[(Sqrt[a - b] + Sqrt[a]*Tan[(e + f*x)/2])/Sqrt[b]])/(a - b)^(5/2) + (
8*a^2*b^2*Cos[e + f*x])/((a - b)^2*(a + b + (a - b)*Cos[2*(e + f*x)])^2) - (2*a*(9*a - 4*b)*b*Cos[e + f*x])/((
a - b)^2*(a + b + (a - b)*Cos[2*(e + f*x)])) - 8*Log[Cos[(e + f*x)/2]] + 8*Log[Sin[(e + f*x)/2]])/(8*a^3*f)

________________________________________________________________________________________

Maple [B]  time = 0.09, size = 408, normalized size = 2.5 \begin{align*} -{\frac{\ln \left ( \cos \left ( fx+e \right ) +1 \right ) }{2\,f{a}^{3}}}-{\frac{9\,b \left ( \cos \left ( fx+e \right ) \right ) ^{3}}{8\,fa \left ( a \left ( \cos \left ( fx+e \right ) \right ) ^{2}- \left ( \cos \left ( fx+e \right ) \right ) ^{2}b+b \right ) ^{2} \left ( a-b \right ) }}+{\frac{{b}^{2} \left ( \cos \left ( fx+e \right ) \right ) ^{3}}{2\,f{a}^{2} \left ( a \left ( \cos \left ( fx+e \right ) \right ) ^{2}- \left ( \cos \left ( fx+e \right ) \right ) ^{2}b+b \right ) ^{2} \left ( a-b \right ) }}-{\frac{7\,{b}^{2}\cos \left ( fx+e \right ) }{8\,fa \left ( a \left ( \cos \left ( fx+e \right ) \right ) ^{2}- \left ( \cos \left ( fx+e \right ) \right ) ^{2}b+b \right ) ^{2} \left ({a}^{2}-2\,ab+{b}^{2} \right ) }}+{\frac{{b}^{3}\cos \left ( fx+e \right ) }{2\,f{a}^{2} \left ( a \left ( \cos \left ( fx+e \right ) \right ) ^{2}- \left ( \cos \left ( fx+e \right ) \right ) ^{2}b+b \right ) ^{2} \left ({a}^{2}-2\,ab+{b}^{2} \right ) }}+{\frac{15\,b}{8\,fa \left ({a}^{2}-2\,ab+{b}^{2} \right ) }\arctan \left ({ \left ( a-b \right ) \cos \left ( fx+e \right ){\frac{1}{\sqrt{b \left ( a-b \right ) }}}} \right ){\frac{1}{\sqrt{b \left ( a-b \right ) }}}}-{\frac{5\,{b}^{2}}{2\,f{a}^{2} \left ({a}^{2}-2\,ab+{b}^{2} \right ) }\arctan \left ({ \left ( a-b \right ) \cos \left ( fx+e \right ){\frac{1}{\sqrt{b \left ( a-b \right ) }}}} \right ){\frac{1}{\sqrt{b \left ( a-b \right ) }}}}+{\frac{{b}^{3}}{f{a}^{3} \left ({a}^{2}-2\,ab+{b}^{2} \right ) }\arctan \left ({ \left ( a-b \right ) \cos \left ( fx+e \right ){\frac{1}{\sqrt{b \left ( a-b \right ) }}}} \right ){\frac{1}{\sqrt{b \left ( a-b \right ) }}}}+{\frac{\ln \left ( \cos \left ( fx+e \right ) -1 \right ) }{2\,f{a}^{3}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(f*x+e)/(a+b*tan(f*x+e)^2)^3,x)

[Out]

-1/2/f/a^3*ln(cos(f*x+e)+1)-9/8/f*b/a/(a*cos(f*x+e)^2-cos(f*x+e)^2*b+b)^2/(a-b)*cos(f*x+e)^3+1/2/f*b^2/a^2/(a*
cos(f*x+e)^2-cos(f*x+e)^2*b+b)^2/(a-b)*cos(f*x+e)^3-7/8/f*b^2/a/(a*cos(f*x+e)^2-cos(f*x+e)^2*b+b)^2/(a^2-2*a*b
+b^2)*cos(f*x+e)+1/2/f*b^3/a^2/(a*cos(f*x+e)^2-cos(f*x+e)^2*b+b)^2/(a^2-2*a*b+b^2)*cos(f*x+e)+15/8/f*b/a/(a^2-
2*a*b+b^2)/(b*(a-b))^(1/2)*arctan((a-b)*cos(f*x+e)/(b*(a-b))^(1/2))-5/2/f*b^2/a^2/(a^2-2*a*b+b^2)/(b*(a-b))^(1
/2)*arctan((a-b)*cos(f*x+e)/(b*(a-b))^(1/2))+1/f*b^3/a^3/(a^2-2*a*b+b^2)/(b*(a-b))^(1/2)*arctan((a-b)*cos(f*x+
e)/(b*(a-b))^(1/2))+1/2/f/a^3*ln(cos(f*x+e)-1)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)/(a+b*tan(f*x+e)^2)^3,x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 4.47296, size = 2356, normalized size = 14.19 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)/(a+b*tan(f*x+e)^2)^3,x, algorithm="fricas")

[Out]

[-1/16*(2*(9*a^3*b - 13*a^2*b^2 + 4*a*b^3)*cos(f*x + e)^3 - ((15*a^4 - 50*a^3*b + 63*a^2*b^2 - 36*a*b^3 + 8*b^
4)*cos(f*x + e)^4 + 15*a^2*b^2 - 20*a*b^3 + 8*b^4 + 2*(15*a^3*b - 35*a^2*b^2 + 28*a*b^3 - 8*b^4)*cos(f*x + e)^
2)*sqrt(-b/(a - b))*log(((a - b)*cos(f*x + e)^2 + 2*(a - b)*sqrt(-b/(a - b))*cos(f*x + e) - b)/((a - b)*cos(f*
x + e)^2 + b)) + 2*(7*a^2*b^2 - 4*a*b^3)*cos(f*x + e) + 8*((a^4 - 4*a^3*b + 6*a^2*b^2 - 4*a*b^3 + b^4)*cos(f*x
 + e)^4 + a^2*b^2 - 2*a*b^3 + b^4 + 2*(a^3*b - 3*a^2*b^2 + 3*a*b^3 - b^4)*cos(f*x + e)^2)*log(1/2*cos(f*x + e)
 + 1/2) - 8*((a^4 - 4*a^3*b + 6*a^2*b^2 - 4*a*b^3 + b^4)*cos(f*x + e)^4 + a^2*b^2 - 2*a*b^3 + b^4 + 2*(a^3*b -
 3*a^2*b^2 + 3*a*b^3 - b^4)*cos(f*x + e)^2)*log(-1/2*cos(f*x + e) + 1/2))/((a^7 - 4*a^6*b + 6*a^5*b^2 - 4*a^4*
b^3 + a^3*b^4)*f*cos(f*x + e)^4 + 2*(a^6*b - 3*a^5*b^2 + 3*a^4*b^3 - a^3*b^4)*f*cos(f*x + e)^2 + (a^5*b^2 - 2*
a^4*b^3 + a^3*b^4)*f), -1/8*((9*a^3*b - 13*a^2*b^2 + 4*a*b^3)*cos(f*x + e)^3 + ((15*a^4 - 50*a^3*b + 63*a^2*b^
2 - 36*a*b^3 + 8*b^4)*cos(f*x + e)^4 + 15*a^2*b^2 - 20*a*b^3 + 8*b^4 + 2*(15*a^3*b - 35*a^2*b^2 + 28*a*b^3 - 8
*b^4)*cos(f*x + e)^2)*sqrt(b/(a - b))*arctan(-(a - b)*sqrt(b/(a - b))*cos(f*x + e)/b) + (7*a^2*b^2 - 4*a*b^3)*
cos(f*x + e) + 4*((a^4 - 4*a^3*b + 6*a^2*b^2 - 4*a*b^3 + b^4)*cos(f*x + e)^4 + a^2*b^2 - 2*a*b^3 + b^4 + 2*(a^
3*b - 3*a^2*b^2 + 3*a*b^3 - b^4)*cos(f*x + e)^2)*log(1/2*cos(f*x + e) + 1/2) - 4*((a^4 - 4*a^3*b + 6*a^2*b^2 -
 4*a*b^3 + b^4)*cos(f*x + e)^4 + a^2*b^2 - 2*a*b^3 + b^4 + 2*(a^3*b - 3*a^2*b^2 + 3*a*b^3 - b^4)*cos(f*x + e)^
2)*log(-1/2*cos(f*x + e) + 1/2))/((a^7 - 4*a^6*b + 6*a^5*b^2 - 4*a^4*b^3 + a^3*b^4)*f*cos(f*x + e)^4 + 2*(a^6*
b - 3*a^5*b^2 + 3*a^4*b^3 - a^3*b^4)*f*cos(f*x + e)^2 + (a^5*b^2 - 2*a^4*b^3 + a^3*b^4)*f)]

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)/(a+b*tan(f*x+e)**2)**3,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [B]  time = 1.64642, size = 717, normalized size = 4.32 \begin{align*} -\frac{\frac{{\left (15 \, a^{2} b - 20 \, a b^{2} + 8 \, b^{3}\right )} \arctan \left (-\frac{a \cos \left (f x + e\right ) - b \cos \left (f x + e\right ) - b}{\sqrt{a b - b^{2}} \cos \left (f x + e\right ) + \sqrt{a b - b^{2}}}\right )}{{\left (a^{5} - 2 \, a^{4} b + a^{3} b^{2}\right )} \sqrt{a b - b^{2}}} + \frac{2 \,{\left (9 \, a^{3} b - 6 \, a^{2} b^{2} + \frac{27 \, a^{3} b{\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} - \frac{68 \, a^{2} b^{2}{\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac{32 \, a b^{3}{\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac{27 \, a^{3} b{\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} - \frac{90 \, a^{2} b^{2}{\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac{120 \, a b^{3}{\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} - \frac{48 \, b^{4}{\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac{9 \, a^{3} b{\left (\cos \left (f x + e\right ) - 1\right )}^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} - \frac{28 \, a^{2} b^{2}{\left (\cos \left (f x + e\right ) - 1\right )}^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} + \frac{16 \, a b^{3}{\left (\cos \left (f x + e\right ) - 1\right )}^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}}\right )}}{{\left (a^{5} - 2 \, a^{4} b + a^{3} b^{2}\right )}{\left (a + \frac{2 \, a{\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} - \frac{4 \, b{\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac{a{\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}}\right )}^{2}} - \frac{4 \, \log \left (-\frac{\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1}\right )}{a^{3}}}{8 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)/(a+b*tan(f*x+e)^2)^3,x, algorithm="giac")

[Out]

-1/8*((15*a^2*b - 20*a*b^2 + 8*b^3)*arctan(-(a*cos(f*x + e) - b*cos(f*x + e) - b)/(sqrt(a*b - b^2)*cos(f*x + e
) + sqrt(a*b - b^2)))/((a^5 - 2*a^4*b + a^3*b^2)*sqrt(a*b - b^2)) + 2*(9*a^3*b - 6*a^2*b^2 + 27*a^3*b*(cos(f*x
 + e) - 1)/(cos(f*x + e) + 1) - 68*a^2*b^2*(cos(f*x + e) - 1)/(cos(f*x + e) + 1) + 32*a*b^3*(cos(f*x + e) - 1)
/(cos(f*x + e) + 1) + 27*a^3*b*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2 - 90*a^2*b^2*(cos(f*x + e) - 1)^2/(co
s(f*x + e) + 1)^2 + 120*a*b^3*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2 - 48*b^4*(cos(f*x + e) - 1)^2/(cos(f*x
 + e) + 1)^2 + 9*a^3*b*(cos(f*x + e) - 1)^3/(cos(f*x + e) + 1)^3 - 28*a^2*b^2*(cos(f*x + e) - 1)^3/(cos(f*x +
e) + 1)^3 + 16*a*b^3*(cos(f*x + e) - 1)^3/(cos(f*x + e) + 1)^3)/((a^5 - 2*a^4*b + a^3*b^2)*(a + 2*a*(cos(f*x +
 e) - 1)/(cos(f*x + e) + 1) - 4*b*(cos(f*x + e) - 1)/(cos(f*x + e) + 1) + a*(cos(f*x + e) - 1)^2/(cos(f*x + e)
 + 1)^2)^2) - 4*log(-(cos(f*x + e) - 1)/(cos(f*x + e) + 1))/a^3)/f